package com.tgy.myplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;

/**
 * (Student)实体类
 *
 * @author makejava
 * @since 2021-10-11 20:36:15
 */
@Data
public class Student implements Serializable {
    private static final long serialVersionUID = 796132194542367002L;

    /**
     * 改变MP的自增策略，防止id过大
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 姓名
     */
    private String name;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 0为男，1为女
     */
    private Integer sex;
    /**
     * 家乡
     */
    private String hometown;
    /**
     * 爱好
     */
    private String hobby;
    /**
     * 时间
     */
    private Date birth;

    /**
     *可以含有多个构造器
     */

    public Student(Integer id,Integer sex,Integer age,String name,String hobby,String hometown,Date birth){
        this.id = id;
        this.sex = sex;
        this.age = age;
        this.name = name;
        this.hobby = hobby;
        this.hometown = hometown;
        this.birth = birth;
    }

    public Student(){
    }

    public Student(Integer id){
        this.id = id;
    }



}
